/***********************************************************************
* Program:
*    Assignment 01, Go Fish
*    Brother Helfrich, CS 235
* Author:
*    <your names here>
* Summary:
*    This is all the functions necessary to play Go Fish!
*
*    Estimated:  0.0 hrs
*    Actual:     0.0 hrs
*      Please describe briefly what was the most difficult part.
************************************************************************/

#include <iostream>
#include <fstream>
#include "set.h"
#include "card.h"
#include "goFish.h"
#include "C:\Users\Spenstar\Dropbox\C++\cs235\lesson00\Vector2\vector.h"
using namespace std;

/***********************************************************************
 * GO FISH
 * The function which starts it all
 ***********************************************************************/
void goFish()
{
   string filename = "hand.txt";
   //cout << "filename: ";
   //cin  >> filename;

   ifstream fin(filename.c_str());
   if (fin.fail())
   {
      cout << "Looser!\n";
      return;
   }

   Vector <Card> v;
   Card c;

   while (fin >> c)
      v.push_back(c);

   fin.close();

   cout << "my cards: ";
   for (VectorIterator <Card> it = v.begin(); it != v.end(); ++it)
      cout << *it << ' ';
   cout << endl;
   return;
}
